package com.travel.api.handler

import com.lgy.sell.controller.BaseController
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.RestControllerAdvice


/**
 * @ClassName 全局异常处理请求头
 * @Author liguangyao
 * @Date 20/8/18 上午11:56
 * @Version 1.0
 **/
@RestControllerAdvice
class GlobalExceptionHandler: BaseController(){

    @ExceptionHandler(value = Exception::class)
    fun exception(e: Exception): Map<String, Any> {
        return fail(e.message)
    }
}